<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: luanzg <782114271@qq.com>
// +----------------------------------------------------------------------
use think\facade\Route;
use app\common\middleware\Admin;

Route::group(function () {
    // 管理员列表
    Route::get('adminhello/:name', 'adminhello');    
    Route::get('users/:id', 'adminInfo'); 
    // Route::put('users/:name/', 'editadminInfo'); 
    Route::put('users/:name/state/:enable', 'upadminState');
    Route::put('users/:name', 'editadminInfo');  
    Route::put('usersinfo/:name', 'editSelfInfo');
    Route::put('userupheadimg/:name', 'upSelfHeadImg');
    Route::put('useruppass/:name', 'useruppass');
    Route::delete('users/:id','adminDelete');    
    Route::get('rights/list', 'rullAdminList');
    Route::get('users','adminList');
    Route::post('users/roles', 'editAdminRoles');
    Route::post('users', 'addAdminUser');
    Route::post('usersdels', 'adminDeletes');
})->prefix('Admin/')->allowCrossDomain(headers())->middleware(Admin::class);
